package net.atomarrow.pr.controller;

import java.util.List;

import net.atomarrow.pr.domain.TbRole;
import net.atomarrow.pr.form.RoleForm;
import net.atomarrow.pr.service.RoleService;
import net.atomarrow.render.Render;
import net.atomarrow.sy.base.BaseController;

public class RoleController extends BaseController {

	private RoleService roleService;
	
	public Render index(){
		return renderJsp("/permission/role/index");
	}

    /**
     * 首页ajax 读取搜索数据
     * @return
     */
    public Render list(){
        RoleForm form = getForm(RoleForm.class);
        List<TbRole> domains = roleService.getList(form);
        return renderDataTables(domains,form.getPager().getDataTotal(),form.getDraw());
    }
    
}
